home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PROGRAM
/
UUPC11QS.ARJ
/
TESTIMP.C
< prev
next >
Wrap
C/C++ Source or Header
|
1991-08-23
|
2KB
|
58 lines
/*--------------------------------------------------------------------*/
/* Program: testimp 06/09/91 */
/* Author: Andrew H. Derbyshire */
/* Function: Test UUPC/extended filename mapping */
/* functions */
/* */
/* Copyright (C) 1991, Andrew H. Derbyshire */
/*--------------------------------------------------------------------*/
#include <stdio.h>
#include <stdarg.h>
#include <assert.h>
#include "lib.h"
#include "import.h"
#include "export.h"
#include "timestmp.h"
char *nodename = "kendra";
char *panic_string = "Program aborting at line %d in file %s";
void main( int argc , char **argv )
{
char canon[FILENAME_MAX];
char host[FILENAME_MAX];
size_t count;
banner( argv ); /* Out of habit, I guess */
assert( argc > 2 );
for( count = 1; count < argc; count = count + 2)
{
importpath( canon, argv[ count + 1], argv[ count] );
printf("import %s\t%s\t yields %s\n",
argv[ count + 1], argv[ count] , canon);
fflush( stdout );
exportpath( host , canon, argv[ count ] );
printf("\nexport %s\t%s\t yields %s\n",
argv[ count + 1], argv[ count] , host );
}
} /* void */
/*--------------------------------------------------------------------*/
/* Replacement for UUPC/extended logging function */
/*--------------------------------------------------------------------*/
void printmsg(int level, char *fmt, ...)
{
va_list arg_ptr;
va_start(arg_ptr,fmt);
vfprintf(stdout, fmt, arg_ptr);
putchar('\n');
}
void bugout( const size_t lineno, const char *fname)
{
printf("bugout at %s line %s\n",fname, lineno );
exit(69);
}